package cn.wsxiot.controller;

import cn.wsxiot.bean.User;
import cn.wsxiot.dao.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/users")
public class UserController {

    @Autowired
    private UserMapper userMapper;

    @GetMapping("/add")
    public String test1() {
        userMapper.insert(new User("111", "222", (byte) 30, "123456"));
        return "add new person";
    }
}
